// 字符串
// Created by yifeng on 2025/4/22.
//
#include <stdio.h>

int main() {
    printf("when you com to a fork in the road, take it. "
           "--Yogi Berra\n");

    char *p = "abc";
//    *p = 'd'; 这行代码有问题，注释掉

    char str[] = "Are we having fun yet?";
    printf("%s\n", str); // print->Are we having fun yet?
    // 截取6个字符输出 规则：%.ps(p是要显示的字符数量)
    printf("%.6s\n", str); // print->Are we
    // Are we having fun yet?      Are we having fun yet?                      Are
    printf("%-25s%25s\n", str, str);
    printf("%25.3s\n", str, str,str);
}